#include<iostream>
using namespace std;

struct Person;
std::istream &read(std::istream&, Person&);
struct Person{

    std::string name, address;

    Person() = default;
    Person(const std::string& sname, const std::string& saddr):
        name(sname), address(saddr) {}
    Person(std::istream &is) { read(is, *this); }
    
};

std::istream &read(std::istream &is, Person &person)
{
    is >> person.name >> person.address;
    return is;

}

std::ostream &print(std::ostream &os, const Person &person)
{
    os << person.name << " " << person.address;
    return os;
}

int main(){

    Person madao("madao", "china");
    print(std::cout, madao) << endl;

    return 0;
}